﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using WeiboSDK;
using Alexis.WindowsPhone;

namespace Cnblogs
{
    public partial class AboutPage : PhoneApplicationPage
    {
        public AboutPage()
        {
            InitializeComponent();
        }

        private void HyperlinkButton_Click(object sender, RoutedEventArgs e)
        {
            GlobalFunc.OpenBrowser("http://weibo.com/xshf12345/");
        }

        private void hpBlog_Click(object sender, RoutedEventArgs e)
        {
            GlobalFunc.OpenBrowser("http://www.cnblogs.com/alexis/");
        }

        private void Support_Click(object sender, RoutedEventArgs e)
        {
            GlobalFunc.OpenEmail("fengshuixu@gmail.com", "FeedBack");
        }

        private void btn_follow_Click(object sender, RoutedEventArgs e)
        {
            if (App.Token == null || App.Token.ExpiresTime.AddSeconds(30) <= DateTime.Now)
            {
                NavigationService.Navigate(new Uri(Constants.P_LoginWeiboPage, UriKind.Relative));
                return;
            }
            WeiboAPI.Request(RequestType.FriendShip_Create, new RequestData { Token = App.Token, ToUid = "1854044370" }, (obj) =>
                {

                });
        }

        private void hb_alipay_Click(object sender, RoutedEventArgs e)
        {
            GlobalFunc.OpenBrowser("https://me.alipay.com/alexis");
        }

        
    }
}